/*
 * Copyright (c) gitee.com/jiandong001.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

import hilog from '@ohos.hilog';
import { ReadableNativeMap } from '../bridge/WritableNativeMap';
import { JavaScriptExecutor, RuntimeConfig } from '../bridge/JavaScriptExecutor'
//import { SoLoader } from '../soloader/SoLoader'
import { HybridData } from '../../napi/HybridData'

export class ArkExecutor extends JavaScriptExecutor {
  private static readonly TAG: string = "React ArkExecutor";
  public static loadLibrary() {
    hilog.info(0x0000, ArkExecutor.TAG, 'loadLibrary');
//    SoLoader.loadLibrary("arkexecutor");
  }

  constructor(jscConfig: RuntimeConfig, enableDebugger: boolean, debuggerName: string) {
    hilog.info(0x0000, ArkExecutor.TAG, 'constructor');
    super(ArkExecutor.initHybrid(enableDebugger, debuggerName, jscConfig.heapSizeMB));
  }

  public getName(): string {
    return "ArkExecutor";
  }

  public static /*native*/ canLoadFile(path: string): boolean { return false }

  private static /*native*/ initHybridDefaultConfig(
    enableDebugger: boolean, debuggerName: string): HybridData { return new HybridData() }

  private static /*native*/ initHybrid(var0: boolean, var1: string, var2: number): HybridData {
    return new HybridData();
  }
}
